package com.bt.lms.service.impl;

import com.bt.lms.entity.StuStatusBasicInfo;
import com.bt.lms.dao.servise.StuStatusBasicInfoDao;
import com.bt.lms.dao.servise.impl.StuStatusBasicInfoDaoImpl;
import com.bt.lms.service.StuStatusBasicInfoService;

import java.sql.SQLException;

/**
 * 学籍基本信息实现
 */
public class StuStatusBasicInfoServiceImpl implements StuStatusBasicInfoService {
    @Override
    public boolean edit(Long id, StuStatusBasicInfo stuStatusBasicInfo) throws SQLException {

        StringBuilder stuStatusSqlSB = new StringBuilder();
        stuStatusSqlSB.append("update stu_status_info set")
                .append(" stu_no = ?,name = ?,id_type = ?,id_card = ?,start_school_date = ?")
                .append(",school_system = ?,class_name = ?,enp_plan = ?")
                .append(",learning_center = ?,student_state = ?,specialty = ?")
                .append(" where stu_basic_info_id = ?");
        String sql = new String(stuStatusSqlSB);

        StuStatusBasicInfoDao stuStatusBasicInfoDao = new StuStatusBasicInfoDaoImpl();
        stuStatusBasicInfoDao.update(sql,stuStatusBasicInfo,id);


        return true;
    }
}
